#include"myproc.h"
#include<unistd.h>

int main()
{
	pid_t id = fork();
	if(id == 0)
	{
		int cnt = 500;
		while(cnt)
		{
			printf("i am a child, my pid is %d ,my parentpid is %d, cnt is %d\n", getpid(),getppid(), cnt);
			cnt--;
			sleep(1);
		}
		exit(0);
	}
	else
	{
		int cnt = 6;
		while(cnt)
		{
			printf("i am father, pid: %d, ppid : %d\n",getpid(),getppid());
			cnt--;
			sleep(1);
		}
	}
	return 0;
}

